package com.hliushi.demo.exception;

import com.iflytek.bp.common.exception.AbstractBpErrors;

/**
 * 定义用户中心异常
 *
 * @author ljgeng
 */
public final class UcErrors extends AbstractBpErrors {

    /**
     * 用户不存在
     */
    public final static UcErrors USER_NOT_FOUNT = new UcErrors("10000", "用户不存在");

    /**
     * 用户未激活
     */
    public final static UcErrors USER_NOT_ACTIVATED = new UcErrors("10001", "用户未激活");

    /**
     * 用户被锁
     */
    public final static UcErrors USER_LOCKED = new UcErrors("10002", "用户被锁");

    /**
     * 密码
     */
    public final static UcErrors USER_WRONG_PASSWORD = new UcErrors("10003", "用户名或密码错误");
    public final static UcErrors PASSWORD_TOO_SIMPLE = new UcErrors("10008", "您输入的密码过于简单");
    public final static UcErrors WRONG_PASSWORD = new UcErrors("10009", "密码错误");
    public final static UcErrors WRONG_OLD_PASSWORD = new UcErrors("10011", "旧密码错误");

    /**
     * 账号已经存在
     */
    public final static UcErrors ACCOUNT_EXISTED = new UcErrors("10004", "账号已经存在");

    public final static UcErrors VERCODE_FAILURE = new UcErrors("10100", "验证码发送失败");
    public final static UcErrors MORE_THAN_VERCODE_TIMES = new UcErrors("10101", "发送验证码操作过于频繁，请稍后重试");
    public final static UcErrors NULL_VERCODE = new UcErrors("10102", "验证码不存在");
    public final static UcErrors ERROR_VERCODE = new UcErrors("10103", "验证码错误");
    public final static UcErrors VERCODE_TYPE_NOT_SUPPORTED = new UcErrors("10104", "类型不支持");
    public final static UcErrors IPBLACK = new UcErrors("10105", "请求错误");

    public final static UcErrors NEED_CHECK = new UcErrors("10106", "需要安全认证");
    public final static UcErrors ACCOUNT_LOCKING = new UcErrors("10107", "账号锁定中");
    //10108,10109被占用
    public final static UcErrors ACCOUNT_LOCK = new UcErrors("10109", "您的账号已被锁定，请24小时后再进行操作");
    public final static UcErrors CODE_EXPIRE = new UcErrors("10110", "验证码已过期");
    public final static UcErrors ACCOUNT_LOCKED = new UcErrors("10111", "您的账号已被锁定，请联系管理员解锁");
    public final static UcErrors ACCOUNT_PHONE_LOST = new UcErrors("10112", "手机号未维护，请直接联系管理员处理");
    public final static UcErrors PWD_DIFF = new UcErrors("10113", "两次输入密码不一致");
    public final static UcErrors PWD_SAME = new UcErrors("10114", "旧密码不可与新密码相同");
    public final static UcErrors OPT_EXPIRE = new UcErrors("10114", "操作过期");
    public final static UcErrors ACCOUNT_NOT_FOUNT = new UcErrors("10115", "账号不存在");


    /**
     * 手机号已经存在
     */
    public final static UcErrors ACCOUNT_PHONE_EXISTED = new UcErrors("10005", "手机号已经存在");

    /**
     * 邮箱已经存在
     */
    public final static UcErrors ACCOUNT_EMAIL__EXISTED = new UcErrors("10006", "邮箱已经存在");

    public final static UcErrors ACCOUNT_DISMISS = new UcErrors("10007", "账号丢失");

    // 以下是cluster 相关错误

    public final static UcErrors CLUSTER_PREFIX_EXISTED = new UcErrors("10010", "蔟群代码已经存在");
    /**
     * 蔟群不存在
     */
    public final static UcErrors CLUSTER_NOT_FOUND = new UcErrors("10014", "蔟群不存在");

    // 以下是application 相关错误

    public final static UcErrors APP_NOT_FOUND = new UcErrors("10024", "应用不存在");

    // 以下是role 相关错误

    public final static UcErrors ROLE_CODE_EXISTED = new UcErrors("10030", "角色代码已经存在");
    public final static UcErrors ROLE_NOT_FOUND = new UcErrors("10034", "角色不存在");

    // 以下是group相关错误

    /**
     * 集团不存在
     */
    public final static UcErrors GROUP_NOT_FOUND = new UcErrors("10044", "集团不存在");
    public final static UcErrors GROUP_ID_EXISTED = new UcErrors("10045", "集团编码已存在");

    // 以下是字典相关错误

    public final static UcErrors DICT_VALUE_REPEAT = new UcErrors("10050", "字典值存在");
    public final static UcErrors DICT_PARENT_NOT_FONND = new UcErrors("10051", "父节点不存在");
    public final static UcErrors DICT_NODE_NOT_FONND = new UcErrors("10052", "节点不存在");

    // 以下是组织相关错误


    public final static UcErrors ORG_NOT_FOUND = new UcErrors("10064", "组织不存在");
    public final static UcErrors ORG_PARENT_NOT_FOUND = new UcErrors("10065", "父组织未指定或不存在");
    public final static UcErrors ORG_WITH_USERS = new UcErrors("10066", "组织存在用户");
    public final static UcErrors ORG_WITH_CHILDREN = new UcErrors("10067", "组织存在下级组织");

    // 以下为菜单相关错误

    public final static UcErrors MENU_NOT_FOUND = new UcErrors("10074", "菜单不存在");
    public final static UcErrors MENU_PARENT_NOT_FOUND = new UcErrors("10071", "父节点不存在");
    public final static UcErrors MENU_HAS_CHILDREN = new UcErrors("10072", "有子菜单");

    // 以下是project 相关错误
    public final static UcErrors PROJECT_NOT_FOUND = new UcErrors("10084", "应用不存在");

    // 以下为构造器

    public UcErrors(String code, String title) {
        super(code, title);
    }

    public UcErrors(String code, String title, String detail) {
        super(code, title, detail);
    }

}
